using MvcMall.Core.Domains;
using MvcMall.Portal.Controllers.Users.ViewModels;

namespace MvcMall.Portal.Controllers.Users.Mappers
{
    public class UserAddressToSaveModelMapper
    {
        public SaveUserAddressModel MapFrom(UserAddress input)
        {
            if (input == null)
                return null;

            return new SaveUserAddressModel
                       {
                           Address = input.Address,
                           AddressLogo = input.AddressLogo,
                           BestSendTime = input.BestSendTime,
                           Mobile = input.Mobile,
                           Phone = input.Phone,
                           SendName = input.SendName,
                           ZipCode = input.ZipCode
                       };
        }
    }
}